package com.hss.rxjava.bean;

/**
 * 购物车满XX包邮活动
 * Created by zhu_sk on 2016/9/5.
 */
public class CartItemBenefit {
    public int type;//1.是满额包邮
    public double sum;//包邮标准

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public double getSum() {
        return sum;
    }

    public void setSum(double sum) {
        this.sum = sum;
    }

    /**
     * 判断活动是否相同
     * @param benefit 对照的活动
     * @return 是否相同
     */
    public boolean equal(CartItemBenefit benefit) {
        if(type == benefit.type && sum == benefit.sum){
            return true;
        }else{
            return false;
        }
    }
}
